﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using System.Data;

namespace Data
{
    public class LogTypeData
    {
         Connect cn =new Connect();

        public LogTypesEntity GetLogType(int lTID)
        {
            int Npara = 1;
            string[] name = new string[Npara];
            object[] value = new object[Npara];
            name[0] = "@LogTypeID"; value[0] = lTID;
            string sql = "dbo.LogTypesSelectByID";
            DataTable dt = cn.GetData(sql, name, value, Npara);
            LogTypesEntity lTE = new LogTypesEntity
            {
                LogTypeID = (int)dt.Rows[0][0],
                Description = dt.Rows[0][1].ToString()
            };
            return lTE;
        }
    
    }
}
